using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Queries;


#region 'T_CLS_MS' Schema
/*
 * 'TClsMs' class maps to 'T_CLS_MS' table.
 * 	 I_CLS_CD                | Type:VARCHAR2  | Len:3     | Nullable:F | PK:T | FK:F
 * 	 I_CLS_DESC              | Type:VARCHAR2  | Len:48    | Nullable:T | PK:F | FK:F
 * 	 I_CLS_CLS               | Type:VARCHAR2  | Len:1     | Nullable:T | PK:F | FK:F
 * 	 I_SYSUSER_CLS           | Type:VARCHAR2  | Len:1     | Nullable:T | PK:F | FK:F
 * 	 I_INQ_ITEM              | Type:VARCHAR2  | Len:1     | Nullable:T | PK:F | FK:F
 * 	 I_ENTRY_DATE            | Type:DATE      | Len:0     | Nullable:T | PK:F | FK:F
 * 	 I_UPD_DATE              | Type:DATE      | Len:0     | Nullable:T | PK:F | FK:F
 * 	 I_UPD_TIMESTAMP         | Type:VARCHAR2  | Len:17    | Nullable:T | PK:F | FK:F
 */
#endregion
/// <summary>
///	Generated by MyGeneration using the ActiveRecord Object Mapper - 1.0.2
///	Created on 2011/9/6 21:54:54
/// </summary>
namespace Com.GainWinSoft.ERP.Entity
{
	[Serializable , ActiveRecord("T_CLS_MS")]
	public class TClsMs : ActiveRecordBase	{

		#region Private Members

		private string iClsCd; 
		private string iClsDesc; 
		private string iClsCls; 
		private string iSysuserCls; 
		private string iInqItem; 
		private DateTime iEntryDate; 
		private DateTime iUpdDate; 
		private string iUpdTimestamp; 
		
		#endregion

		#region Constuctor(s)
		
		public TClsMs()
		{
			iClsCd = String.Empty; 
			iClsDesc = String.Empty; 
			iClsCls = String.Empty; 
			iSysuserCls = String.Empty; 
			iInqItem = String.Empty; 
			iEntryDate = DateTime.MinValue; 
			iUpdDate = DateTime.MinValue; 
			iUpdTimestamp = String.Empty; 

		}

		public TClsMs(
			string i_cls_cd)
			: this()
		{
			iClsCd = i_cls_cd;
			iClsDesc = String.Empty;
			iClsCls = String.Empty;
			iSysuserCls = String.Empty;
			iInqItem = String.Empty;
			iEntryDate = DateTime.MinValue;
			iUpdDate = DateTime.MinValue;
			iUpdTimestamp = String.Empty;
		}

		#endregion // End of Class Constuctor(s)
		
		#region Public Properties
			
		[PrimaryKey(PrimaryKeyType.Assigned ,"I_CLS_CD", Length=3)]
		public virtual string IClsCd
		{
			get { return iClsCd; }
			set { iClsCd = value; }
		}

		[Property(Column="I_CLS_DESC", Length=48)]
		public virtual string IClsDesc
		{
			get { return iClsDesc; }
			set { iClsDesc = value; }
		}

		[Property(Column="I_CLS_CLS", Length=1)]
		public virtual string IClsCls
		{
			get { return iClsCls; }
			set { iClsCls = value; }
		}

		[Property(Column="I_SYSUSER_CLS", Length=1)]
		public virtual string ISysuserCls
		{
			get { return iSysuserCls; }
			set { iSysuserCls = value; }
		}

		[Property(Column="I_INQ_ITEM", Length=1)]
		public virtual string IInqItem
		{
			get { return iInqItem; }
			set { iInqItem = value; }
		}

		[Property(Column="I_ENTRY_DATE")]
		public virtual DateTime IEntryDate
		{
			get { return iEntryDate; }
			set { iEntryDate = value; }
		}

		[Property(Column="I_UPD_DATE")]
		public virtual DateTime IUpdDate
		{
			get { return iUpdDate; }
			set { iUpdDate = value; }
		}

		[Property(Column="I_UPD_TIMESTAMP", Length=17)]
		public virtual string IUpdTimestamp
		{
			get { return iUpdTimestamp; }
			set { iUpdTimestamp = value; }
		}


		#endregion 

			
		#region Equals, HashCode and ToString overrides
		
		/// <summary>
		/// Local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			TClsMs castObj = (TClsMs)obj; 
			return ( castObj != null ) &&
				( this.iClsCd == castObj.IClsCd );
		}
		
		/// <summary>
		/// Local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			
			int hash = 57; 
			hash = 27 * hash * iClsCd.GetHashCode();
			return hash; 
		}
		
		/// <summary>
		/// Local implementation of ToString based on class members
		/// </summary>
		public override String ToString()
        {
            StringBuilder sbuffer = new StringBuilder();
			sbuffer.Append("{");
			
			sbuffer.AppendFormat("IClsCd = {0}, ",iClsCd);
			sbuffer.AppendFormat("IClsDesc = {0}, ",iClsDesc);
			sbuffer.AppendFormat("IClsCls = {0}, ",iClsCls);
			sbuffer.AppendFormat("ISysuserCls = {0}, ",iSysuserCls);
			sbuffer.AppendFormat("IInqItem = {0}, ",iInqItem);
			sbuffer.AppendFormat("IEntryDate = {0}, ",iEntryDate);
			sbuffer.AppendFormat("IUpdDate = {0}, ",iUpdDate);
			sbuffer.AppendFormat("IUpdTimestamp = {0}, ",iUpdTimestamp);
			sbuffer.Append(" }");
			return sbuffer.ToString();
        }
		
		#endregion
	}
}
